package applets;

import java.util.Vector;

import meshToSolid.Selector;

import processing.core.PApplet;
import simpleGeom.Bounds3D;
import simpleGeom.Face3D;
import simpleGeom.HasPos3D;


public class SelectApplet extends PApplet {
	String folderPath="/Users/administrator/Desktop/2012-EXTERN-Grotto/grotto120830/";
	String inputPath=folderPath+"testCyl.obj";
	String outputPath=folderPath+"testExp.obj";;
public void setup(){
	Selector selector=new Selector();
	selector.loadOBJ(inputPath);
	Bounds3D b3d=selector.b3d;
	
	float off=0.1f;
	b3d.x1+=off;
	b3d.y1+=off;
	b3d.z1+=off;
	b3d.x2-=off;
	b3d.y2-=off;
	b3d.z2-=off;
	
	b3d.x2+=off*2;
	
	Face3D maxX=selector.getMaxXFace();
	//b3d.getOffset();
	Vector<Face3D>selectedFaces=selector.selectFaces(selector.faces, b3d, maxX);
	selector.saveObj(outputPath, selectedFaces);
}

}
